l = [int(i) for i in input().strip().split()]
n = len(l)
check = set()
cout = 0
for i in range(2,n):
    cha = abs(l[i] - l[i-1])
    if cha not in check:
        check.add(cha)
        cout += 1

if cout == l[0]-1 :
    print("Jolly")
else:
    print("Not jolly")

# a = input().split()
# i = len(a)
# l = []
# while 1:
#     s = abs(int(a[i - 1]) - int(a[i - 2]))
#     if s not in l:
#         l.append(s)
#     if s >= len(a) or i == 1:
#         break
#     i -= 1
#
# if list(set(l) & set([i for i in range(1, len(a) - 1)])) == l:
#     print("Jolly")
# else:
#     print("Not jolly")

